// import Vue from "vue";
// import VueRouter from "vue-router";
// Vue.use(VueRouter);

import Login from "../pages/Login";
import Reg from "../pages/Reg.vue";
import HotBooks from "../components/HotBooks";
import NewBooks from "../components/NewBooks";
import BookDetail from "../pages/BookDetail";
import NewBooksList from "../components/NewBooksList"


// 路由配置：路径和组件的对应关系
// let routes =

export default [
    {
        path:"/Reg",
        component: Reg
    },
    {
        path:"/Login",
        component: Login
    },
    {
        path:"/HotBooks",
        component: HotBooks
    },
    {
        path:"/BookDetail/:id",
        component: BookDetail
    },
    {
        path:"/NewBooks",
        component: NewBooks
    },
    {
        path:"/NewBooksList/:id",
        component: NewBooksList
    }
];

// 创建Vue-router对象
// export default new VueRouter({
//     // mode:'history',
//     routes
// });
